package com.tsinghua.discharge.dao;

import com.tsinghua.discharge.model.Sector;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SectorMapper {
    int insert(Sector sector);

    Sector accuSelect(@Param("sectorAb") String secterAb, @Param("sectorName")String sectorName,@Param("supSectorId")Integer supSectorId,@Param("userId")Integer userId);

    List<String>  supSectorSelect(Integer userid);

    Integer selectBySecName(@Param("secname") String secname,@Param("userid")Integer userid);

    List<String>  selectBySupsecid(@Param("supsecid")Integer supsecid,@Param("userid")Integer userid);

    List<Sector> selectBySup(@Param("supsecid")Integer supsecid,@Param("userid")Integer userid);

    Integer selectRepeatSup(@Param("supsecid")Integer supsecid,@Param("userid")Integer userid);

    List<Sector> selectBySupsectorid(@Param("supsecid")Integer supsecid,@Param("userid")Integer userid);

    String selectName(@Param("secid")Integer secid,@Param("userid")Integer userid);

    Integer selectIDtoSup(@Param("secid")Integer secid,@Param("userid")Integer userid);

    Sector selectAllBySecName(@Param("secname") String secname,@Param("userid")Integer userid);
    Integer deleteByUser(@Param("userId") Integer userId);
    List<String> selectCheckSector(@Param("userId") Integer userId);
}

